package com.designpattern.observer;

public class Main {

    public static void main(String[] args) {

        ObserverUser user1 = new ObserverUser();
        user1.setName("同事1");
        user1.setStatus("摸鱼中");

        ObserverUser user2 = new ObserverUser();
        user2.setName("同事2");
        user2.setStatus("摸鱼中");

        Test test = new Test();
        test.addObserver(user1);
        test.addObserver(user2);

        test.workStatus();
        test.updateStatus();
        test.workStatus();
    }
}
